package com.buptcoder.wifimap.Utils;

import com.buptcoder.wifimap.provider.WifiMapDatabaseHelper;
import com.buptcoder.wifimap.provider.WifiMapProvider;

import android.net.Uri;
import android.provider.BaseColumns;

public class Constants {
    public static final String NOKIAMAP_DEVINFO_OBJECT = "nokiaMapDevInfo";
    public static final String API_ID = "WWBhk8vY55zMEt183rtB";
    public static final String APP_CODE = "QDGrEnrAI3W1urgWR-ei3Q";

    public static final String NOKIAMAP_CONFIGURATION_OBJECT = "nokiaMapConfiguration";

    public static final String LAST_LAT = "last_latitude";
    public static final String LAST_LON = "last_longitude";
    
    public static final String APINFO_SSID_KEY = "ssid";
    public static final String APINFO_LAT_KEY = "lantitude";
    public static final String APINFO_LON_KEY = "longitude";
    public static final String APINFO_TYPE_KEY = "type";
    public static final String APINFO_UPDATE_KEY = "update";

    public static final String _ID = BaseColumns._ID;
    public static final String SSID = "ssid";
    public static final String LAT = "lantitude";
    public static final String LON = "longitude";
    public static final String UPDATE = "update_time";
    public static final String TYPE = "type";

    private static final String[] WIFI_INFO_PROJECTION = { _ID, SSID, LAT, LON,
            TYPE, UPDATE };

    public static enum PROJECT_INDEX {
        _ID(0), SSID(1), LAT(2), LON(3), TYPE(4), UPDATE(5);
        private int index;

        private PROJECT_INDEX(int index) {
            this.index = index;
        }

        public int getIndex() {
            return index;
        }
    };

    public static final String[] getWifiProjection() {
        return WIFI_INFO_PROJECTION.clone();
    }

    public static final Uri WIFI_APINFO_URL = Uri.withAppendedPath(
            WifiMapProvider.CONTENT_URI, WifiMapDatabaseHelper.Tables.APINFO);
}
